import Home from '@/views/Home'
import Search from '@/views/Search'
import Login from '@/views/Login'
import Register from '@/views/Register'
import Detail from '@/views/Detail'
import AddCartSuccess from '@/views/AddCartSuccess'
import ShopCart from '@/views/ShopCart'

export default [
    { path: '/home', component: Home, meta: { show: true } },
    {
        path: '/search/:keyword?',
        component: Search,
        meta: { show: true },
        name: 'search',
        //  props: true 
    },
    { 
        path: '/detail/:skuId?', 
        component: Detail, 
        meta: { show: true }, 
        name: 'detail' 
    },
    { path: '/addcartsuccess', component: AddCartSuccess, meta: { show: false } },
    { path: '/shopcart', component: ShopCart, meta: { show: false } },
    { path: '/login', component: Login, meta: { show: false } },
    { path: '/register', component: Register, meta: { show: false } },
    { path: '/', redirect: '/home' },
    // { path: '*', component: NotFound }
]